package com.uex.dev.manage.common.trace;

/**
 * @author wangc
 * @create 2023/9/27
 * @description
 */
public class TraceContext {
    static ThreadLocal<TraceInfo> traceInfoLocal = new ThreadLocal<>();

    public static void setTraceInfo(TraceInfo traceInfo) {
        traceInfoLocal.set(traceInfo);
    }

    public static TraceInfo getCurrentTraceInfo() {
        return traceInfoLocal.get();
    }

    public static void clear() {
        traceInfoLocal.remove();
    }
}
